More const drudgery for garmin.
authorrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 10 Sep 2012 05:17:21 +0000 (05:17 +0000)
committerrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 10 Sep 2012 05:17:21 +0000 (05:17 +0000)
git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4201 f51c46e8-681c-474f-0cfe-069cfd0219fb

gpsbabel/garmin_tables.c
gpsbabel/garmin_tables.h
gpsbabel/garmin_txt.c

index 287224cffc044b5fa9079ef855f9427e60a6eb54..5139fe35087a99fba7c1542a44028901a0b132cc 100644 (file)
@@ -577,7 +577,7 @@ gt_country_code_t gt_country_codes[] = {
 };
 
 /* gt_waypt_classes: gdb internal order */
-char* gt_waypt_class_names[] = {
+const char* gt_waypt_class_names[] = {
   "User Waypoint",
   "Airport",
   "Intersection",
@@ -595,7 +595,7 @@ char* gt_waypt_class_names[] = {
 };
 
 /* gt_display_mode_names: this order is used by most devices */
-char* gt_display_mode_names[] = {
+const char* gt_display_mode_names[] = {
   "Symbol & Name",
   "Symbol",
   "Symbol & Description"
@@ -841,8 +841,10 @@ int gt_find_icon_number_from_desc(const char* desc, garmin_formats_e garmin_form
    */
 
   if (find_flag == 0) {
-    char** prefix;
-    char* prefixes[] = {"White ", "Red ", "Green ", "Blue ", "Black ", NULL};
+    const char** prefix;
+    const char* prefixes[] = {
+      "White ", "Red ", "Green ", "Blue ", "Black ", NULL
+    };
 
     for (prefix = prefixes; *prefix != NULL; prefix++) {
       int len = strlen(*prefix);
index b31de0fc23ba0925094cfd248b6e4ef8b7b701e8..ba8a86efd15975c9b5b61d0375e9c929dc682d56 100644 (file)
@@ -57,7 +57,7 @@ typedef enum {
   gt_waypt_class_map_line
 } gt_waypt_classes_e;
 
-extern char* gt_waypt_class_names[];
+extern const char* gt_waypt_class_names[];
 
 typedef struct gt_country_code_s {
   const char* cc;
@@ -76,7 +76,7 @@ typedef enum {
   gt_display_mode_symbol_and_comment
 } gt_display_modes_e;
 
-extern char* gt_display_mode_names[];
+extern const char* gt_display_mode_names[];
 
 #define GT_DISPLAY_MODE_MIN gt_display_mode_symbol_and_name
 #define GT_DISPLAY_MODE_MAX gt_display_mode_symbol_and_comment
index 3be03bf24edf590b6324727546daa9fd2b11b3ee..ada15e5eba88048fa1da64ecc1d984a1dd180d39 100644 (file)
@@ -530,7 +530,7 @@ write_waypt(const waypoint* wpt)
 {
   unsigned char wpt_class;
   garmin_fs_p gmsd;
-  char* wpt_type;
+  const char* wpt_type;
   const char* dspl_mode;
   const char* country;
   double x;